#define _XOPEN_SOURCE
#include <stdio.h>
#include <pwd.h>
#include <sys/types.h>
#include <unistd.h>

int main(int argc, char *argv[])
{
	struct passwd *user;
	user = getpwnam("rainlx");
	printf("name:%s\n",user->pw_name);
	printf("uid:%d\n",user->pw_uid);
	printf("home:%s\n",user->pw_dir);
	printf("passwd:%s\n", user->pw_passwd);
	printf("%s\n", crypt("xielichao", "xi"));
	return 0;
}
